package com.action;

import java.util.List;

import org.apache.tomcat.jni.User;
import org.springframework.beans.factory.annotation.Autowired;

import com.entity.UserEntity;
import com.opensymphony.xwork2.ActionSupport;
import com.service.ReportService;

/**
 * 描述：
 * @author：<a href="mailto:beier.zheng@yeepay.com">郑贝尔</a>
 * @since：Nov 13, 2012 11:07:03 AM
 * @version:1.0
 */
public class MyFirstAcion2 extends ActionSupport{
	private static final long serialVersionUID = 1L;
	@Autowired
	public ReportService reportService;
	public List<UserEntity> empList;
	public UserEntity user;
	public String queryUserList(){
		empList = reportService.queryUsers(user);//测试通用查询
		return SUCCESS;
	}
	public String batchAdd(){
		reportService.batchAdd();//测试批量
		return SUCCESS;
	}
	public String delete(){
		reportService.deleteTest(user);//测试通用删除：删除ID和它后面的一条记录
		empList = reportService.queryAllUser();
		return SUCCESS;
	}
	public String save(){
		reportService.saveone(user);//测试通用新增一条
		return SUCCESS;
	}
	public UserEntity getUser() {
		return user;
	}
	public void setUser(UserEntity user) {
		this.user = user;
	}
	
	
}
